import { Schema, model, Document } from 'mongoose'

export interface TopicSchema extends Document {
  name: string
  avatar_url: string
  introduction: string
}

const topicSchema = new Schema(
    
  {
    __v: { type: Number, select: false },
    name: { type: String, required: true },
    avatar_url: { type: String },
    introduction: { type: String, select: false },
  },
  { timestamps: true }
)

export default model<TopicSchema>('Topic',topicSchema)